package com.atguigu.boot.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @ClassName Person
 * @Description 此类描述:
 * @Author dangchen
 * @DateTime 2022-09-13 19:59
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@ConfigurationProperties(prefix = "person")
public class Person {
    private Integer id;
    private String  personName;
    @DateTimeFormat(pattern = "yyyy-MM-dd")//datetimeformat 用于前端传参， jsonformat用于后端向前端返回数据解析。
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date birth;
    private boolean flag;

    private Dog dog;
    private Map map;

    private String[] itSkills;
    private List lists;
    private Set sets;
    private List<Dog> dogList;
}
